//
//  WBPhotoViewModel.swift
//  SainMicroblog
//
//  Created by chenxinju on 16/5/10.
//  Copyright © 2016年 chenxinju-a2. All rights reserved.
//

import UIKit

class WBPhotoViewModel: NSObject {

    
    var photo: WBPhotoImage?
    
    var thumbnail_pic: NSURL? {
        //已经赋值的时候调用
        //        didSet {
        //        //可以强制解包
        //         thnumbnail_url = NSURL(string: thumbnail_pic!)
        //
        //        }
        
        return NSURL(string: (photo?.thumbnail_pic)!)
        
    }
    

    //通过的init的方法给model赋值
    init(model: WBPhotoImage) {
        self.photo = model
        
        super.init()
    }
    
    
}
